/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GrupoD_Final;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import java.util.*;

//Internal team testing class 
public class MainProve {

    public static void main(String[] args) throws IOException {

        ImpInstantMessage login = null;
        HashMap prove = new HashMap();


        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));




        String username = "pruebasgroupd@gmail.com";
        String password = "ditgrupod";

        String resource = "Home";
        login = new ImpInstantMessage();
        login.login(username, password, resource);



        String to = "usuario2grupod@gmail.com";
        ImpGenericMessage igm = new ImpGenericMessage();

        igm.setDestination("usuario2grupod@gmail.com");
        igm.setSource("pruebasgroupd@gmail.com");
        prove.put("cesc", "MARICA");
        prove.put("paco", "EL MEJOR");
        igm.setMessageType("SEARCH_PROFILE");
        ConvertHash conv = new ConvertHash();
        String prueba = conv.mapToString(prove);
        igm.setContent(prueba);
        while (!reader.readLine().equals("s")) {
            igm.setMessageType("SEARCH_PROFILE");
            login.sendMessage(to, igm);


        }
        login.logout();


    }
}
